﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MathNet.Numerics.LinearAlgebra.Double;

namespace Commonality.Model.Classify
{
    /// <summary>
    /// 类模型
    /// </summary>
    public class ClassModel
    {
        /// <summary>
        /// 类的特征向量
        /// </summary>
        public CEigenvector Eigenvector { get; set; }
        public ClassModel()
        {

        }
        /// <summary>
        /// 构造类的特征向量
        /// </summary>
        /// <param name="LINEi">线别</param>
        /// <param name="PN">料号</param>
        /// <param name="KCAndBF">空格KC和butterfly组合值</param>
        /// <param name="Remark">产品类型</param>
        public ClassModel(LINE LINEi, string PN, KCAndBF KCAndBF, Remark Remark, string Storeroom, string Augmented1, string Augmented2, string Augmented3, string Augmented4, string Augmented5, string Augmented6, string Mo)
        {
            this.Eigenvector = new CEigenvector(LINEi, PN, KCAndBF, Remark,Storeroom,  Augmented1,  Augmented2,  Augmented3,  Augmented4, Augmented5, Augmented6, Mo, DenseMatrix.OfArray(new[,] { { (double)LINEi }, { (double)KCAndBF }, { (double)Remark } }));

            StringEigenvector = (int)LINEi + "," + PN + "," + (int)KCAndBF + "," + (int)Remark + "," + Storeroom + "," + Augmented1 + "," + Augmented2 + "," + Augmented3 + "," + Augmented4 + "," + Augmented5 + "," + Augmented6 + "," + Mo;
        }
        /// <summary>
        /// 特征向量字符格式
        /// </summary>
        public string StringEigenvector { get; set; }
    }
}
